home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Sample Code / Mixed Bag / Sample Components / Sample Components Read Me / Sample Components Read Me
Encoding:
Text File  |  1994-12-07  |  8.7 KB  |  8 lines  |  [ONLN/HLX2]

  1. Sample ComponentsPeter Hoddie©1992 Apple Computer, Inc.This unnamed collection of sample code provides six different sample components which show how you can extend QuickTime. Taken as a whole, they provide a complete example of how to add your own fully supported data type to QuickTime.This sample Derived Media Handler overrides portions of the Base Media Handler to provide a new QuickTime Media Handler which uses QuickDraw Pictures as its samples. Every frame added to a PICT track is a QuickDraw Picture. This is particularly convenient for sample code, since all that is required to draw the image is a call to DrawPicture.The easiest way to create a movie that contains a track which uses the PICT Media Handler is to use the Movie Import Component (described below) to convert your Scrapbook file into a QuickTime movie. The sample Movie Import Component allows you to convert all of the PICT images in a Scrapbook file into a QuickTime movie that uses the PICT Media Handler.To use the Movie Import Component, check out the ImportExportMovie sample code and application also on this QuickTime 1.5 CD. You can also use it from the Standard File Preview dialog in most applications that open movies.The sample Movie Export Component takes a PICT Media Handler track and converts it to a PICS file. Because the samples in a PICT Track are simply QuickDraw Pictures, this process is trivial.To use the Movie Export Component, check out the ImportExportMovie sample code and application also on this QuickTime 1.5 CD.The sample File Preview Component displays previews for PICS files. QuickTime 1.5 contains a PICS Movie Import Component, but no PICS File Preview Component. It would be trivial to modify this component so that you could preview Scrapbook files (which would compliment the Movie Import  Component sample code nicely).To use the File Preview Component simply use Standard File Preview to open a movie (in MoviePlayer, for example). PICS files are shown automatically (because QuickTime contains a PICS MovieImport Component). You will be able to preview them from the dialog now.The sample Sequence Grab Channel Component captures a PICT Track. It captures the image from the area surrounding the current cursor position on the main screen. This is by far the most complex piece of sample code. It shows everything necessary to add the ability to capture new types of data to QuickTime.There is no terribly easy way to use the Sequence Grab Channel Component, short of modifiying the Hack TV sample application on this disk to let you create a PICT grab channel.The sample Sequence Grab Panel Component implements a panel for the PICT Sequence Grab Channel. The panel lets you configure the one option of the PICT Sequence Grab Channel - whether or not it displays the current value of Ticks in the image.Again, there is no terribly easy way to use the Sequence Grab Panel Component, short of modifiying the Hack TV sample application.An MPW make file has been provided for these sample components. Also, a complete build of the sample components is also provided. You can drop it into your Extensions Folder, reboot, and start using some of the Component immediately.Note that these sample Components are meant to be instructive. They are not intended to be the basis of a real product. Furthermore, they only perform limited error checking. For more details on these component types, please see the apporpriate chapter in the QuickTime Components documentation.Ê◊#ˇ ˇˇˇˇ#◊ 
  2. _,Times.°dONLNd)æ<e+‹VSample Components °dONLNd;ÚG0+4 Peter Hoddie°dONLNdGÀSW(oÈ©1992 Apple Computer, Inc.°dONLNd;_<k·(áZUThis unnamed collection of sample code provides six different sample components which°dONLNdëk<wø* Lshow how you can extend QuickTime. Taken as a whole, they provide a complete°dONLNdfiw<Éò* Fexample of how to add your own fully supported data type to QuickTime.°dONLNd%è<õx* This sample °dONLNd1èxõ˚)<Derived Media Handler°dONLNdFè˚õ·)É0 overrides portions of the Base Media Handler to°dONLNdwõ<ß·(√ZSprovide a new QuickTime Media Handler which uses QuickDraw Pictures as its samples.°dONLNdÀß<≥Â* YEvery frame added to a PICT track is a QuickDraw Picture. This is particularly convenient°dONLNd%≥<ø»* Wfor sample code, since all that is required to draw the image is a call to DrawPicture.°dONLNd}À<◊ø*QThe easiest way to create a movie that contains a track which uses the PICT Media°dONLNdœ◊<„æ* NHandler is to use the Movie Import Component (described below) to convert your°dONLNd„<Ô˘* &Scrapbook file into a QuickTime movie.°dONLNdF˚<u* The sample °dONLNdQ˚u)9Movie Import Component°dONLNdg˚‹)ë- allows you to convert all of the PICT images°dONLNdï<∞(/ZLin a Scrapbook file into a QuickTime movie that uses the PICT Media Handler.°dONLNd„<+±*To use the Movie Import°dONLNd˙±+µ)u °dONLNd˚µ+„):Component, check out the ImportExportMovie sample code and°dONLNd6+<7“(SZUapplication also on this QuickTime 1.5 CD. You can also use it from the Standard File°dONLNdå7<C;* 5Preview dialog in most applications that open movies.°dONLNd¬O<[u* The sample °dONLNdÕOu[)9Movie Export Component°dONLNd„O[Ω)ë% takes a PICT Media Handler track and°dONLNd    [<g‘(ÉZTconverts it to a PICS file. Because the samples in a PICT Track are simply QuickDraw°dONLNd^g<sŒ* "Pictures, this process is trivial.°dONLNdÇ<ã‚*RTo use the Movie Export Component, check out the ImportExportMovie sample code and°dONLNd’ã<ó    * *application also on this QuickTime 1.5 CD.°dONLNd£<Øu* The sample °dONLNd £uØ)9File Preview Component°dONLNd!£ØŸ)å, displays previews for PICS files. QuickTime°dONLNdNØ<ª‚(◊ZR1.5 contains a PICS Movie Import Component, but no PICS File Preview Component. It°dONLNd°ª<«Ã* Swould be trivial to modify this component so that you could preview Scrapbook files°dONLNdı«<”Æ* H(which would compliment the Movie Import  Component sample code nicely).°dONLNd>fl<ÎÊ*VTo use the File Preview Component simply use Standard File Preview to open a movie (in°dONLNdïÎ<˜À* PMoviePlayer, for example). PICS files are shown automatically (because QuickTime°dONLNdʘ<’* Qcontains a PICS MovieImport Component). You will be able to preview them from the°dONLNd8<u* dialog now.°dONLNdD<'u* The sample °dONLNdOu'@)9Sequence Grab Channel Component°dONLNdn@'Â)À# captures a PICT Track. It captures°dONLNdí'<3›(OZXthe image from the area surrounding the current cursor position on the main screen. This°dONLNdÎ3<?Â* Yis by far the most complex piece of sample code. It shows everything necessary to add the°dONLNd    E?<K'* 2ability to capture new types of data to QuickTime.°dONLNd    xW<c–*RThere is no terribly easy way to use the Sequence Grab Channel Component, short of°dONLNd    Àc<oÕ* Tmodifiying the Hack TV sample application on this disk to let you create a PICT grab°dONLNd
  3.  o<{d* channel.°dONLNd
  4. )á<ìu* The sample °dONLNd
  5. 4áuì1)9Sequence Grab Panel Component°dONLNd
  6. Qá1ìÕ)º  implements a panel for the PICT°dONLNd
  7. rì<üº(ªZNSequence Grab Channel. The panel lets you configure the one option of the PICTˇb◊#ˇ ˇˇˇˇ#◊ 
  8. _,Times .°dONLNd)<5»+ZQTSequence Grab Channel - whether or not it displays the current value of Ticks in the°dONLNdU5<A\* image.°dONLNd\M<Y‚*WAgain, there is no terribly easy way to use the Sequence Grab Panel Component, short of°dONLNd¥Y<e* *modifiying the Hack TV sample application.°dONLNdflq<}“*PAn MPW make file has been provided for these sample components. Also, a complete°dONLNd0}<â’* Ubuild of the sample components is also provided. You can drop it into your Extensions°dONLNdÜâ<ïÄ* BFolder, reboot, and start using some of the Component immediately.°dONLNd…°<≠‹*WNote that these sample Components are meant to be instructive. They are not intended to°dONLNd!≠<π„* Zbe the basis of a real product. Furthermore, they only perform limited error checking. For°dONLNd|π<≈≥* Pmore details on these component types, please see the apporpriate chapter in the°dONLNdÕ≈<—˚* #QuickTime Components documentation.ˇ